public class Student {
    private String name;
    private int age;
    private Lab[] labs;

    public Student(String name, int age, Lab[] labs) {
        this.name = name;
        this.age = age;
        this.labs = labs;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Lab[] getLabs() {
        return labs;
    }

    public void setLabs(Lab[] labs) {
        this.labs = labs;
    }

    // 计算学生的总收入
    public double getTotalIncome() {
        double totalIncome = 0;
        for (Lab lab : labs) {
            totalIncome += lab.getIncome();
        }
        return totalIncome;
    }

    // 计算学生的总纳税额
    public double getTotalTax() {
        return getTotalIncome() * School.getTaxRate();
    }
}
